package com.ruoyi.framework.web.service;/**
 * Created by XiaoYi  on 2020-03-17 11:19
 */

import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.yf.domain.YfBucket;
import com.ruoyi.yf.domain.YfDept;
import com.ruoyi.yf.domain.YfReportsConfig;
import com.ruoyi.yf.service.IYfBucketService;
import com.ruoyi.yf.service.IYfDeptService;
import com.ruoyi.yf.service.IYfReportsConfigService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * XiaoYi.
 */
@Service("yf")
public class YfService {

    @Autowired
    private ISysUserService userService;
    @Autowired
    private IYfBucketService iYfBucketService;

    @Autowired
    private IYfDeptService iYfDeptService;

    @Autowired
    private IYfReportsConfigService yfReportsConfigService;

    public  List<YfReportsConfig> getReportAll(){
        return yfReportsConfigService.selectYfReportsConfigList(null);
    }

    /**
     * XiaoYi...
     * 查询所有医废人员
     *
     * @Date : 2020-03-18 08:51
     */

    public List<SysUser> getUserList(Long hospitalId, Long roleId) {
        return userService.getUserList(hospitalId, roleId);
    }

    /**
     * 获取 所有医院暂存点\暂存点内 用户角色 采集员、入库员、出库员 列表
     *
     * @return
     */
    public List<SysUser> getHealthWorker(String stagingId) {
        return userService.getHealthWorker(stagingId);
    }

    /**
     * XiaoYi...
     * 查询所有医废垃圾桶
     *
     * @Date : 2020-03-18 08:51
     */
    public List<YfBucket> getbucketList(YfBucket yfBucket) {
        if (yfBucket == null)
            return iYfBucketService.selectYfBucketList(new YfBucket());
        return iYfBucketService.selectYfBucketList(yfBucket);
    }

    public List<YfDept> getList() {
        return iYfDeptService.selectYfDeptList(new YfDept());
    }
}
